package com.da.javatest.niuke.baodian;

/**
 * @author chenlida
 * @date 2020/10/9 10:52
 * https://www.nowcoder.com/practice/346ee3caea314c829abb16440c6cca7e?tpId=8&tags=&title=&diffculty=0&judgeStatus=0&rp=1
 */
public class C31Finder {
    /**
     * 这道题的意思就是给你0~n个整数，numbers里存放全是对应整数的二进制，然后要求你找出不连续整数的数值。
     */
    public static int findMissing(int[][] numbers, int n) {
        for (int i = 0; i < n; i++) {
            if ((i & 1) != numbers[i][0]) {
                return i;
            }
        }
        return n;
    }

    public static void main(String[] args) {
        System.out.println(findMissing(new int[][] {{0}, {0, 1}}, 2));
    }
}
